package com.twu.biblioteca.model;

import org.junit.Before;
import org.junit.Test;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.notNullValue;

/**
 * Created with IntelliJ IDEA.
 * User: st
 * Date: 14-4-20
 * Time: 下午12:08
 * To change this template use File | Settings | File Templates.
 */
public class movie {
    movieModel Movie;

    @Before
    public void setupTest(){
        Movie = new movieModel();
    }
    @Test
    public void  movieNameShouldNotNull(){
        String name="AI";
        assertThat(Movie.setMovieName(name),is(notNullValue()));
    }
    @Test
    public void movieDirectorShouldNotNull(){
        String directorName = "Steven Allan Spielberg";
        assertThat(Movie.setDirector(directorName),is(notNullValue()));
    }

    @Test
    public void movieYearShouldNotNull(){
        String year = "2001";
        assertThat(Movie.setMovieYear(year),is(notNullValue()));
    }
    @Test
    public void movieRatingShouldNotNull(){
        String rating = "8.5";
        assertThat(Movie.setRating(rating),is(notNullValue()));
    }
}
